<template>
  <view class="good-item">
    <navigator
      :url="`/pages/good_detail/good_detail?goods_id=${good.goods_id} `"
      navigate
      hover-class="className"
    >
      <view class="good-img">
        <u-image
          :src="
            good.goods_small_logo ||
            'http://image5.suning.cn/uimg/b2c/newcatentries/0000000000-000000000193373779_1_400x400.jpg'
          "
          mode="widthFix"
          width="100%"
        ></u-image>
      </view>
      <view class="good-info">
        <view class="desc u-line-2">{{ good.goods_name }}</view>
        <view class="price">￥{{ good.goods_price }}</view>
      </view>
    </navigator>
  </view>
</template>

<script>
export default {
  props: {
    good: {
      type: Object,
      default: () => { }
    },
  },
}
</script>

<style scoped lang="scss">
.good-item {
  navigator {
    display: flex;
    margin: 5rpx 0;
    justify-content: center;
    .good-img {
      flex: 1;
      padding: 0 15rpx;
    }
    .good-info {
      flex: 3;
      padding: 15rpx;
      display: flex;
      flex-direction: column;
      justify-content: space-around;
      .price {
        // margin-top: 25rpx;
        color: #eb4450;
      }
    }
  }
}
</style>